#include<iostream>
#include<map>
using namespace std;
typedef long long LL;
const int N = 1e5 + 10;
LL n;
int a[N];
int main()
{
	int t;
	cin >> t;
	/*LL ans = 1;
	int cnt = 0;
	for (int i = 1;; i++) {
		ans *= i;
		if (ans > 1e18) {
			cnt = i;
			break;
		}
	}
	cout << cnt << endl;*/
	while (t--) {
		cin >> n;
		int cnt = 0;
		int ans = 0;
		for (int i = 1; i <= 100; i++) {
			if (n % i == 0)	cnt++;
			else cnt = 0;
			ans = max(cnt, ans);
		}
		cout << ans << endl;
	}
	return 0;
}